//
// Created by Huafv on 2024/9/30.
//

#include "hw_contorller.h"

struct bt_pbuf_t *hci_cmd_ass(struct bt_pbuf_t *p, uint8_t ocf, uint8_t ogf, uint8_t len){

    ((uint8_t *)p->payload)[0] = (ocf & 0xff);
    ((uint8_t *)p->payload)[1] = (ocf >> 8)| ( ogf << 2 );
    ((uint8_t *)p->payload)[2] = len - HCI_CMD_HDR_LEN;

    // todo maintain hci flow control Reduce number of cmd packets

    return p;
}